package com.yu.crm.mapper;

import com.yu.crm.domain.pojo.CrmDevice;
import com.yxzz.common.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 后台 设备管理表 Mapper 接口
 * </p>
 *
 * @author ct
 * @since 2019-08-15
 */
public interface CrmDeviceMapper extends BaseMapper<CrmDevice> {

    /**
     * 批量开启/关闭设备
     * @param list ids
     * @param type type 1 开启  2 关闭
     *      { "ids": "[1,2,3]", "type": 1 }
     */
    void updateList(@Param("list") List<String> list, @Param("type") Integer type);

    /**
     * 通过序列号修改在线状态
     * @param crmDevice
     */
    void updateByDeviceMachineCode(CrmDevice crmDevice);
}
